//冒泡排序
public class SortBubble{
	//编写一个main的主方法
	public static void main(String[] args){
		int arr[] = {24,69,88,57,13};
		int newArr[] = new int[arr.length];

		int temp;

		for(int i = 0; i < arr.length-1; i++){
			for(int j = 0; j < arr.length-1-i; j++){
				if( arr[j] > arr[j+1]){
					temp = arr[j];
					arr[j] = arr[j+1];
					arr[j+1] = temp;
				}
				//newArr[j] = arr[j]; 
			}
		
			System.out.println("\n -- 第"+(i+1)+"轮 -- ");
			for(int s = 0; s < arr.length; s++){
				//System.out.println(s);
				System.out.print(arr[s]+"\t");
			}
		}
		System.out.println("\n");
		
	}

}